import DataType from 'sequelize';
import { sequelize } from '../../sequelize';
const FirewallZone = sequelize.define('FirewallZone', {

  type: {
    type: new DataType.VIRTUAL(DataType.STRING),
    get() {
      return 'FirewallZoneType';
    },
  },

  id: {
    type: DataType.BIGINT,
    primaryKey: true,
    autoIncrement: true,
  },

  name: {
    type: DataType.STRING,
  },

  input: {
    type: DataType.INTEGER,
    defaultValue: 2,           // 0 reject, 1 drop, 2 accept
  },

  output: {
    type: DataType.INTEGER,
    defaultValue: 2,
  },

  forword: {
    type: DataType.INTEGER,
    defaultValue: 2,
  },

  netWork: {
    type: DataType.STRING,
    defaultValue: 2,
  },

  masq: {
    type: DataType.BOOLEAN,
    defalutValue: false,
  },

  mss: {
    type: DataType.BOOLEAN,
    defaultValue: false,
  },

  wtp_id: {
    type: DataType.INTEGER,
  },

});

export default FirewallZone;
